import qs from "qs"
import request from './request'

//请求精品数据
export const JingpinAPI = () => request.get("/products/recommend");
//请求热门数据
export const ReMenAPI = () => request.get("/products/hot");
// 手机发送验证码
export const SendSMSAPI = (params) => request.post("/sendSMS",qs.stringify(params))
// 手机号验证码登录接口
export const PhoneReginAPI = (params) => request.post("/phoneRegin",qs.stringify(params))
// 微信扫码登录
export const WeiXinLoginAPI = (params) => request.post("/wechatUsers/PCLogin",qs.stringify(params))
// 手机绑定微信
export const BindPhoneAPI = (params) => request.post("/wechatUsers/binding",qs.stringify(params))
// 获取用户信息
export const UserProfilesAPI = (params) => request.get("/shop/userProfiles",qs.stringify(params))
// 请求商品详情
export const GoodsDetailsAPI = (id) => request.get(`/products/${id}`)
// 加入购物车
export const AddtoCartAPI = (params) => request.post("/shop/carts/add",qs.stringify(params))
// 搜索商品
export const GoodsSearchAPI = (params) => request.get("/products",{params})
// 请求购物车数据
export const CartDataAPI = () => request.get("/shop/carts")